﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Tab2Sql
{
    /// <summary>
    /// Form which displays program output in a web page / HTML control. This is mainly to allow some syntax highlighting
    /// pretty printing, but functionality is strictly limited. (i.e. this probably doesn't work)
    /// </summary>
    public partial class HTMLForm : Form
    {
        /// <summary>
        /// Default constructor. No overloads.
        /// </summary>
        public HTMLForm()
        {
            InitializeComponent();
            ourWeb = new WebBrowser();
           
        }
        private WebBrowser ourWeb;

        /// <summary>
        /// Main process. Supplied text will be displayed in html window. Maybe.
        /// </summary>
        /// <param name="t">
        /// A <see cref="System.String"/>
        /// </param>
        public void TryThis(string t)
        {
            ourWeb.DocumentText = t;
            ourWeb.PerformLayout();
            ourWeb.Dock = DockStyle.Fill;
            this.theSplitter.Panel1.Controls.Add(ourWeb);
            
            this.Refresh();

        }
        private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
        {
            
        }
        
    }
}
